<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
			<link rel="stylesheet" href="css/start.css" />
	    <script src="js/jquery-3.3.1.min.js"></script>
	     <script src="js/config.js"></script>
		<title>大钞市</title>
	</head>
	<body>
		<div class="container">
			<!--弹窗-->
			
			<div class="tan">
				<div class="meng">
					<div class="right">
						<div class="first">
							<span>1&nbsp; &nbsp;点击右上角的···按钮</span>
						</div>
						
						<div class="second">
							<span>2&nbsp; &nbsp;选择浏览器打开</span>
						</div>
						
					</div>
					
					
				</div>
			</div>
			
			
			
			<!--内容区-->
			<div class="background">
				
				<div class="title-area">
					<div class="title">
						<span>大钞市</span>
					</div>
					
					<div class="title-text">
						<span>最近超火的互动娱乐社区</span>
					</div>
				</div>
				
				
				<div class="img">
					<img src="./images/backRed.png" alt="" />
				</div>
				
				
				<div class="join">
					<div class="top">
						<div>截止<span class="day">2019-3-26</span>为止</div>
						<div>累计已加入</div>
					</div>
					
					<div class="down">
						<div class="num">
							565,623人
						</div>
					</div>
					
				</div>
				
				
				<div class="play">
					<span class="btn">加入我们一起来玩</span>
				</div>
				
				
				
			</div>
			
		
		</div>
		
		
		<script type="text/javascript">


            //判断是ios还是Android手机 返回true/false

            var u = navigator.userAgent;
            var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
            var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端


			//获取当前日期
			
			var myDate = new Date();
			myDate.getYear();        //获取当前年份(2位)
			myDate.getFullYear();    //获取完整的年份(4位,1970-????)
			var month = myDate.getMonth()+1;       //获取当前月份(0-11,0代表1月)
			var day = myDate.getDate();  
			
			var html = myDate.getFullYear()+"-"+ month+"-"+day;
			$(".day").eq(0).html(html)
			
			
			$(".play").eq(0).click(function(){
				var code = GetQueryString("code");
				if(code!=""){
					window.location.href="/apk/dowload/u/dcs_"+code+".apk";
				 }else{
					 window.location.href="/apk/dowload/app-free-release.apk";
				 }
				
			})
			
			
			
			
			//判断是否是微信浏览器的函数
			function isWeiXin(){
			  //window.navigator.userAgent属性包含了浏览器类型、版本、操作系统类型、浏览器引擎类型等信息，这个属性可以用来判断浏览器类型
			  var ua = window.navigator.userAgent.toLowerCase();
			  //通过正则表达式匹配ua中是否含有MicroMessenger字符串
			  if(ua.match(/MicroMessenger/i) == 'micromessenger'){
			  return true;
			  }else{
			  return false;
			  }
			}
			
			
			
			window.onload=function(){
				
				  if(isWeiXin()){
				    // 是微信浏览器，执行操作
                      $(".play").eq(0).click(function(){
                          $(".tan").eq(0).css({display:"block"});
                          return false;
                      })

                  }else{
				　　return false;
				  }
				 
			}
			
			function GetQueryString(name) {
				var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
				var r = window.location.search.substr(1).match(reg);
				if (r != null)
					return unescape(r[2]);
				return null;
			}
			
		</script>
		
	</body>
</html>
